import matplotlib.pyplot as plt
import numpy as np

# 数据
categories = ['Operating Revenue', 'Total Assets', 'Total Liabilities', 'Net Profit']
sales = [124.76, 141.38, 116.93, 1.735]

# 设置柱状图的颜色
colors = ['blue', 'green', 'red', 'purple']

# 创建柱状图
fig, ax = plt.subplots()
bars = plt.bar(categories, sales, color=colors)

# 在柱体上显示销量数据
for bar in bars:
    yval = bar.get_height()
    plt.text(bar.get_x() + bar.get_width()/2.0, yval, round(yval, 2), va='bottom')  # va: vertical alignment

# 设置标题和轴标签
plt.title('Comparison of Accounting Subjects')
plt.xlabel('Accounting Subjects')
plt.ylabel('Amount (Unit: Billion Yuan)')

# 显示图形
plt.show()